Skip to content

Conversation

@radarhere
Copy link
Member

Pillow/src/PIL/ImageFile.py

Lines 816 to 818 in e2b87a0

if self.state.xsize <= 0 or self.state.ysize <= 0:
msg = "Size cannot be negative"
raise ValueError(msg)

Since the size might be equal to zero, this updates the error message to

Size cannot be zero or negative

@radarhere radarhere changed the title Improved error message Improve error message Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant